#include <iostream>
using namespace std;

int* straight_select_sort(int array[],int len)
{
	for(int i = 0;i<len;i++)
	{
		int min = array[i];
		int index = i;
		for(int j = i+1;j<len;j++)
		{
			if(min>array[j])
			{
				min = array[j];
				index = j;
			}
		}

		array[index] = array[i];
	       	array[i] = min;	
	}
	return array;
}
int main()
{
	int a[10] = {6,1,4,2,5,8,9,7,0,3};
	straight_select_sort(a,10);
	for(int i = 0;i<10;i++)
	{
		cout<<*(a+i)<<" ";
	}
	return 0;
}
